@import './theme.scss';
@mixin themeify($s: 0.3s) {
  @each $theme-name, $theme-style in $themes {
    $theme-style: $theme-style !global;
    [data-theme='#{$theme-name}'] & {
      @content;
    }
  }
  transition: background-color $s, border-color $s;
}
@function Color($color) {
  @return map-get($theme-style, $color);
}

// flex
@mixin flex-center($direction: row, $aligin-items: center) {
  display: flex;
  flex-direction: $direction;
  justify-content: center;
  align-items: $aligin-items;
}

@mixin flex-between($direction: row, $between: space-between) {
  display: flex;
  flex-direction: $direction;
  justify-content: $between;
  align-items: center;
}

// 文字溢出隐藏
@mixin ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@mixin ellipsis-lines($num: 2) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $num;
}

// 滚动条样式
@mixin scrollbar-style {
  // Firefox
  scrollbar-width: thin;
  scrollbar-color: $gray transparent;

  &::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: $gray;
  }
}
@mixin scrollbar-hide {
  // Firefox
  scrollbar-width: none;

  &::-webkit-scrollbar {
    width: 0px;
    height: 0px;
  }
}
